//14.求一个正整数 倒转后加上1024的结果.比如 12345倒转后是54321,加上1024，结果是55345.
public class Task {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个数");
        int sum=0,b=1,count=0,a=0,data=input.nextInt();
        while (!(data/b==0)){
            b*=10;
            count++;
        }
        b=1;
        while (count!=0){
            count--;
            a = data/b%10;
            sum+=a*Math.pow(10,count);
            b*=10;
        }
        int result=1024+sum;
        System.out.println(result);
    }
}